Repository navigation
chore: quiet CI warnings and expose evaluate_flags on the Rails facade - #371
Conversation
posthog-ruby-async Compliance ReportDate: 2026-11-24T15:52:48.568539+00:00 ✅ All Tests Passed!47/47 tests passed Capture Tests✅ 30/30 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
posthog-ruby-sync Compliance ReportDate: 2026-11-24T15:52:45.126119+00:00 ✅ All Tests Passed!47/47 tests passed Capture Tests✅ 30/30 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
SDK performance: posthog-rubyBenchmarks completed. No changes flagged for review. Flags require at least a 5% change in the median and all six pairs agreeing on direction. This is a noise filter, not proof of a performance change or a CI gate. View all results
Values are medians of paired measurements. Not flagged does not mean unchanged. Unavailable means a measurement could not be provided, not zero. Estimated allocation measurements retain their instrumentation uncertainty. RSS measures the whole process, not just SDK allocations; observed peaks are sampled checkpoints. Paired ranges in the diagnostics describe variability, not confidence intervals. Each shard uses its own runner; compare Before PR against With PR within a row, not across shards. Compared 102 metric rows; 102 rows shown in all results. Omitted or shortened data remain in |
dustinbyrne
left a comment
There was a problem hiding this comment.
Looks good — all four cleanups (commander major ignore in Dependabot, posthog-ruby.gemspec author, scoped RSpec deprecation warning filter, and explicit PostHog.evaluate_flags delegation on the Rails facade with snapshot/changesets) are minimal and verified. Left one optional test-clarity suggestion on railtie_spec.rb.
AI-assisted review.
💡 Motivation and Context
Cleans up the warnings and the failure found in the latest CI, release and Dependabot runs.
>= 3.0floor, so the whole grouped update fails. Dependabot now ignores commander major updates. Minor and patch updates still come through.gem buildwarns "no author specified" in the Unit Tests and Release jobs.posthog-ruby.gemspecnow listsPostHogas the author, matchingposthog-rails.[posthog-ruby] DEPRECATION:lines in each RSpec job. Each spec builds a new client, so the once-per-client limit never applies.spec_helper.rbnow drops these warnings unless an example is tagged:deprecation_warnings. The existing deprecation tests carry that tag and still assert the messages. The deprecated methods are unchanged: they keep warning and forwarding to the same evaluation path, as in posthog-python and posthog-node.is_feature_enabledandget_feature_flagbut notevaluate_flags.PostHog.evaluate_flagsalready worked throughmethod_missing, andrailtie_specalready relies on it. It is now defined explicitly next to the other flag methods, so it shows up in the public API snapshot.The
railties >= 5.2.0open-ended dependency warning is left as is on purpose. RubyGems' suggested~> 5.2would block Rails 6 and later. A cap such as< 9would make every Rails major release wait for a posthog-rails release first.The evaluate-flags spec in sdk-specs allows SDKs to keep the deprecated single-flag getters. This PR does not change how they behave.
💚 How did you test it?
bundle exec rspec: 2589 examples, 0 failures. The output went from about 900 posthog-ruby deprecation lines to none. The remaining Railsto_timedeprecation comes from ActiveSupport 7.2 and is not part of this change.railtie_specexamples:PostHog.evaluate_flagsis defined on the facade, passes its arguments through and returns the client's snapshot (fails without the facade change). A second example calls it through the facade with a real test-mode client, with deprecation warnings let through, and checks nothing reaches stderr.bundle exec rubocop: no offenses.bundle exec rake public_api:checkpasses. The snapshot now listsPostHog.evaluate_flags.gem build posthog-ruby.gemspecno longer prints the author warning..github/dependabot.ymlparses as YAML. The ignore rule will only be confirmed by the next Dependabot run.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Pi (Claude) read the logs of the latest CI, release and Dependabot runs, and the maintainer chose which findings to fix in this PR. Routing the deprecated getters through
evaluate_flagswas considered and rejected. It would change their return values (nilvsfalsefor unknown flags inis_feature_enabled, andmatch_value:inget_feature_flag_payload). It would also drop the per-callsend_feature_flag_events:option, which the Ruby snapshot readers do not support yet.